<!DOCTYPE html>
<!--suppress ALL -->
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('数据信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>热度等级：</label>
                                <input type="text" name="heat"/>
                            </li>
                            <!--<li class="select-time">-->
                                <!--<label>签入时间：</label>-->
                                <!--<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCheckTime]"/>-->
                                <!--<span>-</span>-->
                                <!--<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCheckTime]"/>-->
                            <!--</li>-->
                            <li>
                                <label>真实姓名：</label>
                                <input type="text" name="realname"/>
                            </li>
                            <li>
                                <label>抖音昵称：</label>
                                <input type="text" name="nickname"/>
                            </li>
                            <li>
                                <label>抖音号：</label>
                                <input type="text" name="account"/>
                            </li>
                           <!-- <li>
                                <label>粉丝数量：</label>
                                <input type="text" name="fanNumber"/>
                            </li>-->
                            <li>
                                <label>短视频方向：</label>
                                <input type="text" name="svDirection"/>
                            </li>
                            <li>
                                <label>才艺特长：</label>
                                <input type="text" name="talents"/>
                            </li>
                            <!--<li class="select-time">-->
                                <!--<label>生日：</label>-->
                                <!--<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginBrithday]"/>-->
                                <!--<span>-</span>-->
                                <!--<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endBrithday]"/>-->
                            <!--</li>-->
                            <li>
                                <label>电话：</label>
                                <input type="text" name="phone"/>
                            </li>
                            <li>
                                <label>微信：</label>
                                <input type="text" name="weixin"/>
                            </li>
                            <li>
                                <label>所在城市：</label>
                                <input type="text" name="city"/>
                            </li>
                           <!-- <li>
                                <label>直播时段：</label>
                                <input type="text" name="liveTime"/>
                            </li>-->
                            <li>
                                <label>是否直播过外站：</label>
                                <select name="liveForeighn" th:with="type=${@dict.getType('')}">
                                    <option value="">请选择</option>
                                    <option th:each="dict : ${@dict.getType('sys_yes_no')}" th:text="${dict.dictLabel}" th:value="${dict.dictSort}"></option>
                                </select>
                            </li>
                    <!--        <li>
                                <label>外站流水：</label>
                                <input type="text" name="foreighnFlow"/>
                            </li>-->
                            <li>
                                <label>直播设备：</label>
                                <input type="text" name="liveEquipment"/>
                            </li>
                            <li>
                                <label>推荐人：</label>
                                <input type="text" name="recommend"/>
                            </li>
                           <!-- <li>
                                <label>运营人：</label>
                                <input type="text" name="operation"/>
                            </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:data:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:data:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:data:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:data:export">
                    <i class="fa fa-download"></i> 导出
                </a>

            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:data:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:data:remove')}]];
        var transToo = [[${@permission.hasPermi('system:data:transto')}]];
        var prefix = ctx + "system/data";
        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "数据信息",
                onDblClickRow:function(row,index,layero){
                    layer.open({
                        type: 2,
                        area: ['500' + 'px', '400' + 'px'],
                        fix: false,
                        //不固定
                        maxmin: true,
                        shade: 0.3,
                        title: "查看信息",
                        content: prefix+"/userdata/"+row.id,
                        btn: ['确定', '关闭'],
                        // 弹层外区域关闭
                        shadeClose: true,
                        yes: function (index) {
                            layer.close(index);
                        },
                        cancel: function(index) {
                            return true;
                        }
                    });
                },
                columns: [{
                    checkbox: true,
                    /*formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" ondblclick="fa(\'' + row.id + '\')"></a> ');
                        return actions.join('');
                    },*/
                },
                {
                    field: 'id', 
                    title: 'id',
                    visible: false
                },
                {
                    field: 'heat', 
                    title: '热度等级'
                },
                {
                    field: 'checkTime', 
                    title: '签入时间'
                },
                {
                    field: 'realname', 
                    title: '真实姓名'
                },
                {
                    field: 'nickname', 
                    title: '抖音昵称'
                },
                {
                    field: 'account', 
                    title: '抖音号'
                },
                {
                    field: 'fanNumber', 
                    title: '粉丝数量'
                },
                {
                    field: 'svDirection', 
                    title: '短视频方向'
                },
                {
                    field: 'talents', 
                    title: '才艺特长'
                },
                {
                    field: 'brithday', 
                    title: '生日'
                },
                {
                    field: 'phone', 
                    title: '电话'
                },
                {
                    field: 'weixin', 
                    title: '微信'
                },
                {
                    field: 'city', 
                    title: '所在城市'
                },
                {
                    field: 'liveTime', 
                    title: '直播时段'
                },
                {
                    field: 'liveForeighn', 
                    title: '是否直播过外站',
                    formatter: function (value) {
                        if (value == '1' ){
                            return '<div >是</div>'
                        }else if (value =='2'){
                            return '<div >否</div>'
                        }
                    }
                },
                {
                    field: 'foreighnFlow', 
                    title: '外站流水'
                },
                {
                    field: 'liveEquipment', 
                    title: '直播设备'
                },
                {
                    field: 'recommend', 
                    title: '推荐人'
                },
                {
                    field: 'operation', 
                    title: '运营人'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        actions.push('<a class="btn btn-info btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="transTo(\'' + row.id + '\')"><i class="fa fa-remove"></i>转移</a>');
                        return actions.join('');
                    },

                }
                    // options.onDblClickRow=function () {
                    //    console.log("dasdfa")
                    // }
                ]};

            $.table.init(options);
            //$.table.bootstrapTable.onDblClickRow=fa()
            //$.table.init()
        });

        function transTo(id) {

            var title,url,width,height
                title="转移给",
                url=prefix+"/transto/"+id,
                width='500',
                height='400'
            $.modal.openTab(title,url)
            //$.modal. parentTab(title,url)
        }
    </script>
</body>
</html>